home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / basic / amiblitz_ful.lha / AmiBlitz2 / Examples / egjplot3_pc.bb < prev    next >
Encoding:
Text File  |  1980-09-11  |  868 b   |  41 lines

  1. ;Lattice symmetry is achieved by setting x and y to periodic
  2. ;functions of x and y prior to calculating the z.
  3. ;This is an easy way of filling the screen with smoothly fitting pieces.
  4. p2#=2*Pi
  5. Graphics 640,480,32
  6.  
  7. For i#=0 To 63
  8.   x#=(6*i)/4:x=Sin((p2*x)/6)
  9.   
  10.   For j#=0 To 63
  11.     y#=6-(6*j)/4:y=Sin((p2*y)/6)
  12.     
  13.     z#=Cos(y*y)-x
  14.      a#=Tan(x-y+Cos(x+y))  
  15.     z#=z#;-Cos(a+0.3)
  16.             integer_x#    = Int(z-0.5)      
  17. zz# = z - integer_x#
  18.       
  19.     ;zz.f=frac(xf)
  20.         If zz<0
  21.         zz=zz+1
  22.         EndIf
  23.         zz=zz*2:If zz>1
  24.         zz=2-zz
  25.         EndIf
  26.     c%=Int((zz*16+16)-0.5)
  27.     c=c*10
  28.         If c=256
  29.         c=256
  30.         EndIf
  31.     Color c,c*256,c*65536
  32.     Plot i,j
  33. Next:Next
  34. ;GetaShape 0,0,0,64,64
  35. ;For i=0 To 256 Step 64:For j=0 To 192 Step 64
  36.   ;Blit 0,i,j
  37. ;Next:Next
  38. MouseWait
  39. ;VWait 50
  40. ;SaveBitmap 0,"dh1:fpufalsch2.iff"
  41.